import pm2 from 'pm2';
import Promise from 'bluebird';

/**
 * 重启 Mock 进程
 * @return {Promise}
 */
export async function restartAPIMock() {
    return Promise.fromCallback(callback =>
        pm2.restart('api-mock', callback));
}